package com.geekca.d8;

import java.util.Scanner;

public class ShieldNumber {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入你的手机号码:");
        String cellNumber = scanner.next();

        if (cellNumber.length() != 11) {
            System.out.println("手机号长度不对!");
        } else {
            String str1 = cellNumber.substring(0, 3);
            String str3 = cellNumber.substring(7);

            String str2 = "****";
            String shieldNumber = str1 + str2 + str3;
            System.out.println("屏蔽后的号码为:" + shieldNumber);
        }

    }
}
